#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.trigger.http.mapstruct.request;
import ${package}.api.model.request.UserReq;
import ${package}.domain.user.model.entity.UserEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserReqConvert {

    UserReqConvert INSTANCE = Mappers.getMapper(UserReqConvert.class);
    // 由于属性名相同，所以可以直接转换
    @Mappings(
            @Mapping(target = "gender" ,expression = "java(${package}.domain.user.model.valobj.GenderEnum.getGenderEnumByCode(userReq.getGender()))")
    )
    UserEntity convertUserReqToUserEntity(UserReq userReq);
}
